跳到主要内容

ISERROR

Checks whether a value is an error, and returns true or false.

Syntax

expression.ISERROR(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1Requirednumberstringboolean

Returns

boolean

Example

const oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("B3").SetValue("#N/A")
var result = oFunction.ISERR("B3");
oWorksheet.GetRange("C3").SetValue(result)